<div class="feeds view">
<h2><?php  __('Feed');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $feed['Feed']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $feed['Feed']['name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Url'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $feed['Feed']['url']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Download Regex'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $feed['Feed']['download_regex']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Download Xpath'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $feed['Feed']['download_xpath']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Url Pattern'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $feed['Feed']['url_pattern']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Updated'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $feed['Feed']['updated']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Edit Feed', true), array('action'=>'edit', $feed['Feed']['id'])); ?> </li>
		<li><?php echo $html->link(__('Delete Feed', true), array('action'=>'delete', $feed['Feed']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $feed['Feed']['id'])); ?> </li>
		<li><?php echo $html->link(__('List Feeds', true), array('action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Feed', true), array('action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Favorites', true), array('controller'=> 'favorites', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Favorite', true), array('controller'=> 'favorites', 'action'=>'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Favorites');?></h3>
	<?php if (!empty($feed['Favorite'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Title'); ?></th>
		<th><?php __('Regex'); ?></th>
		<th><?php __('Check Dupes'); ?></th>
		<th><?php __('Save Dir'); ?></th>
		<th><?php __('Last Match'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($feed['Favorite'] as $favorite):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $favorite['id'];?></td>
			<td><?php echo $favorite['title'];?></td>
			<td><?php echo $favorite['regex'];?></td>
			<td><?php echo $favorite['check_dupes'];?></td>
			<td><?php echo $favorite['save_dir'];?></td>
			<td><?php echo $favorite['last_match'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'favorites', 'action'=>'view', $favorite['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'favorites', 'action'=>'edit', $favorite['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'favorites', 'action'=>'delete', $favorite['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $favorite['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Favorite', true), array('controller'=> 'favorites', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
